<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

<script>
  const p = new Promise((resolve, reject)=>{
    let i = 1;
    setTimeout(()=>{
      resolve(i)
      i++
      console.log(i)
    },1000)
    i++
    console.log(i)
    let a = i
    a++
    console.log(a)
    reject(a)
  })
  .then(value => {
    let num = value
    let b = ++num
      console.log(b)
  },
  reason => {
    let c = --reason
    console.log(c)
  })
</script>
</body>
</html>